Syntax error at '{'; expected '}' when using nagios in puppet

Posted by jiangchengwu on Server Fault See other posts from Server Fault or by jiangchengwu
Published on 2012-06-07T09:12:19Z Indexed on 2012/06/07 10:42 UTC
Read the original article Hit count: 260

Filed under:
|
|

It's a big problem to me, because I'm not familiar with puppet.

ERROR on the puppetmaster: debug: importing '/etc/puppet/manifests/nodes/group-1.pp' err: Could not parse for environment production: Syntax error at '{'; expected '}' at /etc/puppet/manifests/nodes/group-1.pp:6

ERROR on the puppet client: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Syntax error at '{'; expected '}' at /etc/puppet/manifests/nodes/group-1.pp:6

in group-1.pp:

node 'group1' { include ntp

    class { 'nagios::host':           #this is line 6
            nodename => $clientcert,
            appname => 'test',
    }   

}

nagios::host in module module/nagios/host.pp code are here:

class nagios::host($nodename, $hostgroup) {

file { '/usr/lib/nagios/plugins': mode => "755", require => Package["nagios-plugins"], }

...

@@nagios_service { "${nodename}_check_ssh":
  ensure => present,
  use => 'generic-service',
  host_name => "${nodename}",
  notification_interval => 60,
  flap_detection_enabled => 0,
  service_description => "SSH",
  check_command => "check_ssh",
  target => "/etc/nagios3/services.d/${nodename}.cfg",
} 

}

and the file module/nagios/init.pp is blank

How could I fix it ?

© Server Fault or respective owner

Related posts about nagios

Related posts about puppet